import 'package:flutter/material.dart';

class LoginPage extends StatefulWidget {
  const LoginPage({super.key});

  @override
  State<LoginPage> createState() => _LoginPageState();
}

class _LoginPageState extends State<LoginPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('登录页面'), centerTitle: true),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text('登录跳转演示，执行登录返回上一个页面'),
            ElevatedButton(
              onPressed: () {
                //返回上一级
                Navigator.of(context).pop();
              },
              child: Text('执行任务'),
            ),
          ],
        ),
      ),
    );
  }
}
